home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 December / 2004-12 CHIP.iso / CHIP / Porady / Srodowisko PHP-MySQL / WAMP5 1.3 / wamp5_1.3.exe / {app} / Apache / cgi-bin / printenv.pl
Perl Script  |  1999-11-24  |  287b  |  14 lines

  1. #!/usr/local/bin/perl
  2. ##
  3. ##  printenv -- demo CGI program which just prints its environment
  4. ##
  5.  
  6. print "Content-type: text/plain\n\n";
  7. foreach $var (sort(keys(%ENV))) {
  8.     $val = $ENV{$var};
  9.     $val =~ s|\n|\\n|g;
  10.     $val =~ s|"|\\"|g;
  11.     print "${var}=\"${val}\"\n";
  12. }
  13.  
  14.